/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.lang.reflect.Method;
import java.util.Arrays;

/**
 * <p>Project: jse2204 - Ex
 * <p>Powered by webrx On 2022-10-09 11:20:10
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex {
    public static void main(String[] args) {
        //利用反射技术，打印输出String类的所有方法名称
        Class<?> c = String.class;
        Method[] ms = c.getDeclaredMethods(); //java17 141 所有方法包括private
        //ms = c.getMethods(); //90 个方法Method
        System.out.println(ms.length);
        for (Method m : ms) {
            //System.out.println(Arrays.toString(m.getParameters()));
            System.out.println(m.getName());
            //System.out.printf("%s(%s)%n",m.getName(),Arrays.toString(m.getParameters()));

        }
    }
}
